package com.wb3.meta.task;

import com.wb3.meta.api.core.service.GoodsOrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@Configuration
@EnableScheduling    //开启定时任务
public class UpdateOrderStatusTask {

    @Autowired
    private GoodsOrdersService goodsOrdersService;

    @Scheduled(fixedDelay = 1000 * 60)
    public void handleNoPayOrder(){
        goodsOrdersService.handleNoPayOrder();
    }
}
